import { postRequest, getRequest, deleteRequest } from '@/utils/api'

const $tenantManageApi = {
    // 新增租户
    addTenant: param => {
        return postRequest('/gv-kube/tenant/gvKubeTenant/add', param)
    },
    // 分页获取租户信息
    pageGetTenantInfo: param => {
        return postRequest('/gv-kube/tenant/gvKubeTenant/get/page', param)
    },
    // 分页获取用户信息
    pageGetUserInfo: param => {
        return postRequest('/gv-kube/user/get/page', param)
    },
    // 删除租户
    deleteTenant: param => {
        return postRequest('/gv-kube/tenant/gvKubeTenant/delete', param)
    },
    // 更新租户
    updateTenant: param => {
        return postRequest('/gv-kube/tenant/gvKubeTenant/update', param)
    },
    //查看编辑
    editTenant : param => {
        return postRequest(`/gv-kube/tenant/gvKubeTenant/edit?id=${param}`)
    },
    //获取集群详细信息
    pageGetClusterInfo : param => {
        return getRequest('/gv-kube/resource/cluster/detail', param)
    }
}

export default $tenantManageApi
